package ex_3;

public class Stock {
    String symbol;
    String name;
    Double previousClosePrice;
    Double currentPrice;
    Stock(String symbol, String name) {
        this.symbol = symbol;
        this.name = name;
    }
    void getChangePercent() {
        System.out.println("ChangePercent: " + (currentPrice - previousClosePrice)/currentPrice*100 + "%");
    }

    public void Set_currentPrice(double v) {
        currentPrice = v;
        System.out.println("Current Price: " + currentPrice);
    }

    public void Set_previousClosePrice(double v_last) {
        previousClosePrice = v_last;
        System.out.println("Previous Close Price: " + previousClosePrice);
    }
}
